﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;


namespace Araman.Resources
{
    using System.Resources;
    using System.Threading;
    using System.Globalization;
    using System.Text.RegularExpressions;
    using Araman;

    /// <summary>
    /// 
    /// </summary>
    public class Language
    {
        /// <summary>
        /// Changes the current language resource file for current threat.
        /// </summary>
        /// <param name="langCode">The RFC 4646 string code of the language. (Ex: en-US, tr-TR)</param>
        public static void ChangeCurrentLanguage(string langCode)
        {
            CultureInfo CultureInf = CultureInfo.GetCultureInfoByIetfLanguageTag(langCode);
            Thread.CurrentThread.CurrentUICulture = CultureInf;
            Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(CultureInf.Name);
        }

        ///// <summary>
        ///// Gets the string value from current language resource file.
        ///// </summary>
        ///// <param name="key">The name of the resource string.</param>
        ///// <param name="additionalParams">This key-value paired dictionary will be used for replacement of dynamic parts in the resource string. All strings match with the dictionary key will be replaced to its value.</param>
        //public static string GetString(string keyName, string ResourceName)
        //{
            
        //}
        //public static string GetString(string keyName, Type resourceType, IDictionary<string, string> replacementList)
        //{
           
        //}
    }
}